package com.simple.datax.db.mybatis.model;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 
 * @author paladin
 *
 */
public class DataxSent implements Serializable {
    private Long id;

    private String recvRawMsgid;

    private String sendMsgid;

    private String messageid;

    private Short resendCount;

    private Short status;

    private Date time;

    private Long dataSize;

    private String senderid;

    private String senderNode;

    private String receiverid;

    private String receiverNode;

    private String serviceCode;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRecvRawMsgid() {
        return recvRawMsgid;
    }

    public void setRecvRawMsgid(String recvRawMsgid) {
        this.recvRawMsgid = recvRawMsgid == null ? null : recvRawMsgid.trim();
    }

    public String getSendMsgid() {
        return sendMsgid;
    }

    public void setSendMsgid(String sendMsgid) {
        this.sendMsgid = sendMsgid == null ? null : sendMsgid.trim();
    }

    public String getMessageid() {
        return messageid;
    }

    public void setMessageid(String messageid) {
        this.messageid = messageid == null ? null : messageid.trim();
    }

    public Short getResendCount() {
        return resendCount;
    }

    public void setResendCount(Short resendCount) {
        this.resendCount = resendCount;
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Long getDataSize() {
        return dataSize;
    }

    public void setDataSize(Long dataSize) {
        this.dataSize = dataSize;
    }

    public String getSenderid() {
        return senderid;
    }

    public void setSenderid(String senderid) {
        this.senderid = senderid == null ? null : senderid.trim();
    }

    public String getSenderNode() {
        return senderNode;
    }

    public void setSenderNode(String senderNode) {
        this.senderNode = senderNode == null ? null : senderNode.trim();
    }

    public String getReceiverid() {
        return receiverid;
    }

    public void setReceiverid(String receiverid) {
        this.receiverid = receiverid == null ? null : receiverid.trim();
    }

    public String getReceiverNode() {
        return receiverNode;
    }

    public void setReceiverNode(String receiverNode) {
        this.receiverNode = receiverNode == null ? null : receiverNode.trim();
    }

    public String getServiceCode() {
        return serviceCode;
    }

    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode == null ? null : serviceCode.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DataxSent other = (DataxSent) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRecvRawMsgid() == null ? other.getRecvRawMsgid() == null : this.getRecvRawMsgid().equals(other.getRecvRawMsgid()))
            && (this.getSendMsgid() == null ? other.getSendMsgid() == null : this.getSendMsgid().equals(other.getSendMsgid()))
            && (this.getMessageid() == null ? other.getMessageid() == null : this.getMessageid().equals(other.getMessageid()))
            && (this.getResendCount() == null ? other.getResendCount() == null : this.getResendCount().equals(other.getResendCount()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime()))
            && (this.getDataSize() == null ? other.getDataSize() == null : this.getDataSize().equals(other.getDataSize()))
            && (this.getSenderid() == null ? other.getSenderid() == null : this.getSenderid().equals(other.getSenderid()))
            && (this.getSenderNode() == null ? other.getSenderNode() == null : this.getSenderNode().equals(other.getSenderNode()))
            && (this.getReceiverid() == null ? other.getReceiverid() == null : this.getReceiverid().equals(other.getReceiverid()))
            && (this.getReceiverNode() == null ? other.getReceiverNode() == null : this.getReceiverNode().equals(other.getReceiverNode()))
            && (this.getServiceCode() == null ? other.getServiceCode() == null : this.getServiceCode().equals(other.getServiceCode()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRecvRawMsgid() == null) ? 0 : getRecvRawMsgid().hashCode());
        result = prime * result + ((getSendMsgid() == null) ? 0 : getSendMsgid().hashCode());
        result = prime * result + ((getMessageid() == null) ? 0 : getMessageid().hashCode());
        result = prime * result + ((getResendCount() == null) ? 0 : getResendCount().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode());
        result = prime * result + ((getDataSize() == null) ? 0 : getDataSize().hashCode());
        result = prime * result + ((getSenderid() == null) ? 0 : getSenderid().hashCode());
        result = prime * result + ((getSenderNode() == null) ? 0 : getSenderNode().hashCode());
        result = prime * result + ((getReceiverid() == null) ? 0 : getReceiverid().hashCode());
        result = prime * result + ((getReceiverNode() == null) ? 0 : getReceiverNode().hashCode());
        result = prime * result + ((getServiceCode() == null) ? 0 : getServiceCode().hashCode());
        return result;
    }
    
    public String toString() {
		return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}
}